package com.wanczy.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wanczy.mapper.OrderMapper;
import com.wanczy.pojo.Address;
import com.wanczy.pojo.Order;
import com.wanczy.service.OrderService;

@Service
public class OrderServiceImpl implements OrderService {
	
	@Autowired
	private OrderMapper orderMapper;

	@Override
	public List<Address> queryAddress(Integer userId) {
		List<Address> list = orderMapper.queryAddress(userId);
		return list;
	}

	@Override
	public int addOrder(Order order) {
		int count = orderMapper.addOrder(order);
		return count;
	}

	@Override
	public int desGoodsNum(Integer goodsId, Integer orderNum) {
		int count = orderMapper.desGoodsNum(goodsId, orderNum);
		return count;
	}

}
